package com.demo.gulimall.order.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 订单操作历史记录
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("oms_order_operate_history")
public class OrderOperateHistory implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 订单id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`order_id`")
	private String orderId;

	/** 操作人[用户；系统；后台管理员] */
	@TableField(value = "`operate_man`")
	private String operateMan;

	/** 操作时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`", fill = FieldFill.INSERT)
	private Date createTime;

	/** 订单状态【0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->无效订单】 */
	@TableField(value = "`order_status`")
	private Integer orderStatus;

	/** 备注 */
	@TableField(value = "`note`")
	private String note;

}
